<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>二维码生成器</title>
  <link rel="stylesheet" href="popup.css">
</head>
<body>
  <div class="popup-title">二维码生成器</div>
  <div class="container">
    <div class="left">
      <div class="input-actions">
        <button id="get-url-btn">获取当前网址</button>
        <button id="clear-input-btn">清空内容</button>
      </div>
      <textarea id="qr-input" placeholder="请输入内容" rows="8"></textarea>
    </div>
    <div class="center">
      <div class="param-group">
        <label>尺寸(px): <input type="number" id="qr-size" min="100" max="500" value="200"></label>
      </div>
      <div class="param-group">
        <label>前景色: <input type="color" id="qr-foreground" value="#000000"></label>
      </div>
      <div class="param-group">
        <label>背景色: <input type="color" id="qr-background" value="#ffffff"></label>
      </div>
      <div class="param-group">
        <label>边距(px): <input type="number" id="qr-margin" min="0" max="20" value="4"></label>
      </div>
      <div class="param-group">
        <label>纠错等级:
          <select id="qr-level">
            <option value="L">L (7%)</option>
            <option value="M" selected>M (15%)</option>
            <option value="Q">Q (25%)</option>
            <option value="H">H (30%)</option>
          </select>
        </label>
      </div>
    </div>
    <div class="right">
      <div id="qr-code"></div>
      <button id="download-btn">下载二维码</button>
    </div>
  </div>
  <script src="qrcode.min.js"></script>
  <script src="popup.js"></script>
</body>
</html> 